//
//  TopCollectionViewCell.m
//  Movie
//
//  Created by mycomputer on 15/7/22.
//  Copyright (c) 2015年 杨韦智. All rights reserved.
//

#import "TopCollectionViewCell.h"
#import "UIImageView+WebCache.h"


@implementation TopCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(TopModel *)model {
    _model = model;
    [self setNeedsLayout];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    _titleLabel.text = _model.title;
    NSString *imageStr = [_model.images objectForKey:@"small"];
    [_ImageView sd_setImageWithURL:[NSURL URLWithString:imageStr]];
    _starView.average = _model.average;
    _averageLabel.text = [NSString stringWithFormat:@"%.1f",_model.average];
}

@end
